//
//  XmlRpc.m
//  MobilCommunity
//
//  Created by easystudio on 7/11/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "XmlRpc.h"
#import "XmlRequestBody.h"
#import "Session.h"
#import "Type.h"
#import "HttpServerURL.h"
#import "LoginView.h"
#import "AppDelegate.h"
#import "InfoType.h"

@implementation XmlRpc

@synthesize result;
@synthesize response;

-(id)init
{
	self = [super init];
	if(self)
	{
        xmlRequestBody = [[XmlRequestBody alloc] init];
    }
    return self;
}
 
-(void)dealloc
{
    self.result = nil;
    //self.response = nil;
   [response release];
    response = nil;

    if (xmlRequestBody != nil){
        [xmlRequestBody release];
    }
    
    [super dealloc];
}

-(NSMutableArray *)SendRequest:(NSString *)methodName params:(NSMutableDictionary *)requestParams
{
    NSString *userid = [[NSString alloc] initWithFormat:@"%@" ,[[Session share] getMemberID]];
    if (userid != nil) 
    {
        [requestParams setObject:userid forKey:@"userID"];
    }
    [userid release];
    response = [[NSMutableArray alloc]initWithArray:[xmlRequestBody SendRequest:methodName params:requestParams]] ;
        
    //判断是否session超时
    if ([response count] > 0)
    {
        NSString *time_out=[[response objectAtIndex:0] objectForKey:@"session_timeout"];
        if ([time_out isEqualToString:@"yes"])
        {

//   NSMutableDictionary * login_params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:[[Session share] getMemberID], @"regName",[[Session share] getMemberPass],@"password", nil];
//            response = [[NSMutableArray alloc]initWithArray:[xmlRequestBody SendRequestNoFilter:login_login params:login_params]] ;
//            
//  if ([response count] > 0)
//  {
//     response = [[NSMutableArray alloc]initWithArray:[xmlRequestBody SendRequest:methodName params:requestParams]] ;
//     return response;
//  }
//  return nil;

            LoginView *loginview = [[LoginView alloc] init];
            [loginview setFlagLoginType:INFO_TYPE_LOGIN_MANU];
            [loginview.view setFrame:CGRectMake(0, 0, 320, 480)];
            [loginview release];
            [response removeAllObjects];
        }
    }
    
    return response;
}

-(NSMutableArray *)SendRequestNoFilter:(NSString *)methodName params:(NSMutableDictionary *)requestParams
{
//    xmlRequestBody = [[XmlRequestBody alloc] init];
    response = [[NSMutableArray alloc]initWithArray:[xmlRequestBody SendRequestNoFilter:methodName params:requestParams]] ;    
//    [xmlRequestBody release];
    
    return response;
}


#pragma mark - More
//从Portal获取url
-(NSString *) GetSubURLFromPortal:(NSString *)company_code
{
    NSString *ret_url = [[NSString alloc] initWithString:[xmlRequestBody SendRequestGetSubURL:company_code]];    
    NSLog(@"response url:%@",ret_url);
    return ret_url;      
}


-(NSMutableDictionary *)Member_Login:(NSString *)userName PassWord:(NSString *)passWord Origin:(NSString *)origin
{    
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:userName, @"regName",passWord,@"password",origin,@"origin", nil];
    dictionarys = [self SendRequestNoFilter:login_login params:params];
    [params release];
    
    if ([dictionarys count] < 1)
        return nil;
    
    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    return [dictionarys objectAtIndex:0];
}


-(NSMutableArray *) GetMemberPosi
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:[[Session share] getMemberID], @"userid",nil];
    dictionarys = [self SendRequest:common_GetPosi params:params];
    [params release];
    
    return dictionarys;
}
//feedback
-(void) SaveFeedBack:(NSMutableDictionary *)content
{
    [self SendRequest:common_SaveFeedBack params:content];
}

//获取新版本
-(NSMutableDictionary *) GetNewVersion
{
    NSMutableArray* dictionarys;
    dictionarys = [self SendRequestNoFilter:common_GetNewVersion params:nil];
    if ([dictionarys count] < 1)
        return nil;
    
    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    return [dictionarys objectAtIndex:0];  
}


#pragma mark - Mission
-(NSMutableArray *) GetMsgList:(NSString *)user_id msgType:(NSString *)msg_type searchType:(NSString *)search_type searchWord:(NSString *)search_word posiId:(NSString *)posi_id startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:user_id, @"id",@"",@"is_read",msg_type,@"msgType",search_type,@"search_type",search_word,@"search_word",posi_id,@"posiId",startrows, START_ROW, rowsperpage, ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:message_GetMsgList params:params];
    
    [params release];
    
    return dictionarys;   
}


-(NSMutableDictionary *) GetMsgCount:(NSString *)user_id PosiID:(NSString *)posi_id Type:(NSString *)msg_type
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:user_id, @"id", posi_id, @"posiId",msg_type, @"msgType",@"0",@"is_read",@"0", START_ROW, @"10000", ROWS_PER_PAGE,nil];

    dictionarys = [self SendRequest:message_GetMsgCount params:params];
    [params release];
    if ([dictionarys count] < 1)
        return nil;
    
    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    return [dictionarys objectAtIndex:0];
}

-(NSMutableDictionary *) SetMsgRead:(NSString *)msg_id Type:(NSString *)msg_type IsRead:(NSString *)is_read
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:msg_id, @"id", msg_type, @"msgType",is_read,@"is_read",nil];
    
    dictionarys = [self SendRequest:message_SetMsgRead params:params];
    [params release];
    if ([dictionarys count] < 1)
        return nil;
    
    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    return [dictionarys objectAtIndex:0];
}

//  //Approve
-(NSMutableArray *) GetApproveList:(NSString *)role_id posiId:(NSString *)posi_id startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:role_id, @"role_id",posi_id,@"posiId",startrows, START_ROW, rowsperpage, ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:message_GetApproveList params:params];
    
    [params release];
    
    return dictionarys;       
}

-(NSMutableDictionary *) GetApproveInfo:(NSString *)approveid
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:approveid, @"id", nil];
    
    dictionarys = [self SendRequest:message_GetApproveInfo params:params];
    [params release];
    if ([dictionarys count] < 1)
        return nil;
    
    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    return [dictionarys objectAtIndex:0];
}


-(void) SendAgreeDisallow:(NSMutableDictionary *)content
{
    [self SendRequest:message_DoAgreeDisallow params:content];
}

-(int) GetApproveListCount:(NSString *)role_id posiId:(NSString *)posi_id
{
    int ret=0;
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:role_id, @"role_id",posi_id,@"posiId",nil];
    
    dictionarys = [self SendRequest:message_GetApproveListCount params:params];
    [params release];
    if ([dictionarys count] < 1)
        return 0;
    
    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    NSString *strBack = [[dictionarys objectAtIndex:0] objectForKey:@"count5"];
    ret = strBack.intValue;
    return ret;
}


-(NSMutableArray *) GetApproveHistoryList:(NSString *)order_id tableName:(NSString *)table_name WorkFlowId:(NSString *)workflow_id
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:order_id,@"id",table_name, @"table_name",workflow_id,@"workflow_id",nil];
    
    dictionarys = [self SendRequest:message_GetAuditListForOneApprove params:params];
    
    [params release];
    
    return dictionarys;    
}


#pragma mark - Customer
-(NSMutableArray *) GetCustomerList:(NSString *)employeeid PosiID:(NSString *)positionid startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:employeeid, @"employeeId", positionid, @"positionId",startrows, START_ROW, rowsperpage, ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:customer_GetCustomerList params:params];
    
    [params release];
    return dictionarys;
}

-(NSMutableArray *) GetSearchCustomerList:(NSString *)employeeid PosiID:(NSString *)positionid Type:(NSString *)type searchWord:(NSString *)searchword startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{    
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:employeeid, @"employee_id",positionid, @"positionId",searchword,@"search_condition",type,@"type",startrows, START_ROW, rowsperpage, ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:customer_GetSearchCustList params:params];
    
    [params release];
    return dictionarys;    
}

-(NSMutableDictionary *) GetCustomerInfo:(NSString *)custid
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithCapacity:0];
    [params setObject:custid forKey:@"cust_id"];
    dictionarys = [self SendRequest:customer_GetCustomer params:params];
//    NSMutableDictionary* dict = [[NSMutableDictionary alloc] initWithDictionary:[dictionarys objectAtIndex:0]]; 
    [params release];
    if ([dictionarys count] < 1)
        return nil;

    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    return [dictionarys objectAtIndex:0];
}

-(void) SaveCustomerContract:(NSMutableDictionary *)contactDict
{
    [self SendRequest:customer_SaveCustomerContract params:contactDict];
}
//新增客户
-(void) SaveNewCustomer:(NSMutableDictionary *)customerDict ;
{
    [self SendRequest:customer_SaveNewCustomer params:customerDict];
   
}
//Json20120213
-(NSMutableArray *) GetCustContractList:(NSString *)custid
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:custid, @"customer_id",nil];
    
    dictionarys = [self SendRequest:customer_GetCustContractList params:params];
    
    [params release];
    return dictionarys;
}

-(NSMutableArray *) GetCustPortList:(NSString *)custid
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:custid, @"cust_id",nil];
    
    dictionarys = [self SendRequest:customer_GetCustPortList params:params];
    
    [params release];
    return dictionarys;
}

-(NSMutableArray *) GetCustDocketsList:(NSString *)custid
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:custid, @"cust_id",nil];
    
    dictionarys = [self SendRequest:customer_GetCustDocketsList params:params];
    
    [params release];
    return dictionarys;
    
}

-(NSMutableArray *) GetCustPictureList:(NSString *)custid
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:custid, @"customer_id",nil];
    
    dictionarys = [self SendRequest:customer_GetCustPictureList params:params];
    
    [params release];
    return dictionarys;
    
}

-(NSMutableArray *) GetCustomerOriginList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows, START_ROW, rowsperpage, ROWS_PER_PAGE,nil];
    dictionarys = [self SendRequest:customer_GetCustomerOriginList params:params];
    [params release];
    return dictionarys; 
}
-(NSMutableArray *) GetCustomerTypeList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows, START_ROW, rowsperpage, ROWS_PER_PAGE,nil];
    dictionarys = [self SendRequest:customer_GetCustomerTypeList params:params];
    [params release];
    return dictionarys; 
}
-(NSMutableArray *) GetCustomerCreditList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows, START_ROW, rowsperpage, ROWS_PER_PAGE,nil];
    dictionarys = [self SendRequest:customer_GetCustomerCreditList params:params];
    [params release];
    return dictionarys; 
}


#pragma mark - Product
-(NSMutableArray *) GetProductList:(NSString *)userid startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:userid, @"USER_ID",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:product_GetProductList params:params];
    
    [params release];
    
    return dictionarys;
}

-(void) SaveNewProduct:(NSMutableDictionary *)productDict
{
    [self SendRequest:product_SaveNewProduct params:productDict];
}

-(NSMutableArray *) GetProductPictureList:(NSString *)product_id startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:product_id, @"product_id",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:product_GetProductPictureList params:params];
    
    [params release];
    
    return dictionarys; 
}

-(NSMutableDictionary *) GetProduct:(NSString *)product_id
{
    NSMutableArray* dictionarys;
    
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:product_id, @"product_id",nil];
    
    dictionarys = [self SendRequest:product_GetProduct params:params];
    [params release];
    
    if ([dictionarys count] < 1)
        return nil;

    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    return [dictionarys objectAtIndex:0];
}

//产品类别
-(NSMutableArray *) GetProductCategoryList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:product_GetProductCategoryList params:params];
    
    [params release];
    return dictionarys;
}

-(NSMutableArray *) GetSearchProductCategoryList:(NSString *)p_search startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:p_search,@"prod_category_search",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];

    dictionarys = [self SendRequest:product_GetSearchProductCategoryList params:params];
    [params release];
    
    return dictionarys;    
}

//产品单位
-(NSMutableArray *) GetProductUnitList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:product_GetProductUnitList params:params];
    
    [params release];
    return dictionarys;
}

-(NSMutableArray *) GetSearchProductUnitList:(NSString *)p_search startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:p_search,@"prod_unit_search",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:product_GetSearchProductUnitList params:params];
    [params release];
    
    return dictionarys;    
}

//产品海关编码
-(NSMutableArray *) GetProductCustomsCodeList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:product_GetCustomsCodeList params:params];
    [params release];
    
    return dictionarys;
}

-(NSMutableArray *) GetSearchProductCustomsCodeList:(NSString *)p_search startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:p_search,@"customs_code_search",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:product_GetSearchCustomsCodeList params:params];
    
    [params release];
    return dictionarys;    
}


//GetSearchProductList
-(NSMutableArray *) GetSearchProductList:(NSString *)user_id searchCondition:(NSString *)p_search searchType:(NSString *)search_type startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSLog(@"user_id=%@,p_search=%@,search_type=%@,startrows=%@,rowsperpage=%@",user_id,p_search,search_type,startrows,rowsperpage);
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:user_id,@"user_id",p_search, @"search_condition",search_type,@"type",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:product_GetSearchProductList params:params];
    [params release];
    
    return dictionarys;
}

-(NSMutableArray *) GetProductSupplierList:(NSString *)product_id
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:product_id, @"product_id",nil];
    
    dictionarys = [self SendRequest:product_GetProductSupplierList params:params];
    
    [params release];
    
    return dictionarys;    
}

//GetProductConversionRateList
-(NSMutableArray *) GetProductConversionRateList:(NSString *)product_id
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:product_id, @"product_id",nil];
    
    dictionarys = [self SendRequest:product_GetProductConversionRateList params:params];
    
    [params release];
    
    return dictionarys;    
}


-(NSMutableArray *) GetProductAssemblyList:(NSString *)product_id
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:product_id, @"product_id",nil];
    
    dictionarys = [self SendRequest:product_GetProductAssemblyList params:params];
    
    [params release];
    
    return dictionarys;       
}

-(NSMutableArray *) GetProductCustomList:(NSString *)product_id
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:product_id, @"product_id",nil];
    
    dictionarys = [self SendRequest:product_GetProductCustomList params:params];
    
    [params release];
    
    return dictionarys;           
}

-(NSMutableArray *) GetProductPackingList:(NSString *)product_id
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:product_id, @"product_id",nil];
    
    dictionarys = [self SendRequest:product_GetProductPackingList params:params];
    
    [params release];
    
    return dictionarys;        
}

#pragma mark - QuotationList
-(NSMutableArray *) GetQuotationList:(NSString *)userId period:(NSString *) period positionID:(NSString *)positionId startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSLog(@"userId=%@,period=%@,positionId=%@,startrows=%@,rowsperpage=%@",userId,period,positionId,startrows,rowsperpage);
    
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:userId, @"userId",period,@"period",positionId,@"positionId",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:quotation_GetQuotationList params:params];
    
    [params release];
    
    return dictionarys;
    
}

-(NSMutableDictionary *) GetQuotationBasic:(NSString *)quotationid
{
    NSMutableArray* dictionarys;
    
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:quotationid, @"quotation_id",nil];
    
    dictionarys = [self SendRequest:quotation_GetQuotationBasic params:params];
    [params release];
    
    if ([dictionarys count] < 1)
        return nil;
    
    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    return [dictionarys objectAtIndex:0];    
}

-(NSMutableDictionary *) GetQuotationOffer:(NSString *)quotationid
{
    NSMutableArray* dictionarys;
    
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:quotationid, @"quotation_id",nil];
    
    dictionarys = [self SendRequest:quotation_GetQuotationOffer params:params];
    [params release];
    
    if ([dictionarys count] < 1)
        return nil;

    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    return [dictionarys objectAtIndex:0];
}

-(NSMutableArray *) GetQuotationProductList:(NSString *)quotationid startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:quotationid, @"quotation_id",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:quotation_GetQuotationProductList params:params];
    
    [params release];
    
    return dictionarys;

}


-(NSMutableArray *) GetSearchQuotationList:(NSString *)p_search Type:(NSString *)type startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSString *userid = [NSString stringWithFormat:@"%@" ,[[Session share] getMemberID]];
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:userid, @"user_id",p_search,@"search_condition",type , @"type",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:quotation_GetSearchQuotationList params:params];
    
    [params release];
    
    return dictionarys;   
}

-(NSMutableArray *) GetQuotationProductList:(NSString *)price_quote_no
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:price_quote_no,@"price_quote_id",nil];
    
    dictionarys = [self SendRequest:quotation_GetQuotationProductList params:params];
    
    [params release];
    
    return dictionarys;       
}

-(NSMutableArray *) GetCostModel:(NSString *)quot_id
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:quot_id,@"quotation_id",@"0",START_ROW,@"100",ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:quotation_GetCostModel params:params];
    
    [params release];
    
    return dictionarys;   
}

//@"币种"
-(NSMutableArray *) GetCurrencyTypeList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:quotation_GetCurrencyTypeList params:params];
    
    [params release];
    
    return dictionarys;   
}

//@"起运港"
-(NSMutableArray *) GetPortList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:quotation_GetPortList params:params];
    
    [params release];
    
    return dictionarys;   
}
//@"价格条款"
-(NSMutableArray *) GetPriceClauseTypeList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    dictionarys = [self SendRequest:quotation_GetPriceClauseTypeList params:params];
    [params release];
    return dictionarys;   
}

//成本模型
-(NSMutableArray *) GetCostModelList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    dictionarys = [self SendRequest:quotation_GetAllPriceQuoteCostModel params:params];
    [params release];
    return dictionarys;   
}

//报价单位
-(NSMutableArray *) GetQuotProductUnitList:(NSString *)prod_id startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:prod_id,@"product_id",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:product_GetQuotProductUnitList params:params];
    
    [params release];
    return dictionarys;
}


-(void) InsertQuotationBasic:(NSMutableDictionary *)quotion
{
    [self SendRequest:quotation_SaveNewQuotation params:quotion];
    
}
-(void) InsertQuotationProduct:(NSMutableDictionary *)quotion_product
{
    [self SendRequest:quotation_SaveQuoteProducts params:quotion_product];
    
}


#pragma mark - Chance
-(NSMutableArray *) GetChanceList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSString *userid = [NSString stringWithFormat:@"%@" ,[[Session share] getMemberID]];
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:userid, @"user_id",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:chance_GetChanceList params:params];
    
    [params release];
    
    return dictionarys;     
}

-(NSMutableDictionary *) GetChance:(NSString *)chance_id
{
    NSMutableArray* dictionarys;
    
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:chance_id, @"chance_id",nil];
    
    dictionarys = [self SendRequest:chance_GetChance params:params];

    [params release];
    if ([dictionarys count] < 1)
        return nil;

    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    return [dictionarys objectAtIndex:0];
}

-(NSMutableArray *) GetSearchChanceList:(NSString *)p_search searchType:(NSString *)search_type startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSString *userid = [NSString stringWithFormat:@"%@" ,[[Session share] getMemberID]];
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:userid, @"user_id",p_search,@"search_condition",search_type,@"type",startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:chance_GetSearchChanceList params:params];
    
    [params release];
    
    return dictionarys;   
}

-(int) isUseBusinessChance
{
    NSMutableArray* dictionarys;
    
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:nil];
    
    dictionarys = [self SendRequest:chance_isUseBusinessChance params:params];
    
    [params release];
    if ([dictionarys count] < 1)
        return 0;
    
    NSLog(@"response count:%d",[[dictionarys objectAtIndex:0] count]);
    int ret=0;
    ret=[[[dictionarys objectAtIndex:0] objectForKey:@"flag"] intValue];
    return ret;
}

-(void) InsertChanceChance:(NSMutableDictionary *)chance
{
    [self SendRequest:chance_SaveChanceChance params:chance];
    
}



#pragma mark - mail
-(NSString *)Mail_GetNewMailCount:(NSString *)userName SessionId:(NSString *)sessionid
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:userName, @"regName",sessionid,@"sessionid", nil];
    
    dictionarys = [self SendRequest:mail_GetNewMailCount params:params];
    
    [params release];
    if ([dictionarys count] < 1) 
    {
        return 0;
    }
    NSMutableDictionary* dic = [dictionarys objectAtIndex:0];
    NSString *number = [NSString stringWithFormat:@"%@",[dic objectForKey:@"param"]];
    return number;
}

//******************************************************
// Method:     getMailList
// Access:     public 
// Returns:    void
// Parameter:  employee_id
// Parameter:  startrows
// Parameter:  rowsperpage
// Note:	   得到邮箱信息
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableArray *) getMailList:(NSString *)employee_id box:(NSString *)box startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,employee_id,@"employee_id",box,@"box_type", nil];
    dictionarys = [self SendRequest:mail_GetMailList params:params];
    [params release];
    return dictionarys;
}
//******************************************************
// Method:     getSearchMailList
// Access:     public 
// Returns:    BOOL
// Parameter:  mailShareID
// Note:	   根据邮件题目和发送人名字查询
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableArray *)getSearchMailList:(NSString*)employee_id boxType:(NSString*)boxType  search_condition:(NSString*)search_condition search_type:(NSString*)search_type startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* arrayList;
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:                 
                                   employee_id, @"employee_id", 
                                   boxType, @"box_type",
                                   search_condition, @"search_condition",
                                   search_type, @"search_type",
                                   startrows, @"START_ROW",
                                   rowsperpage, @"ROWS_PER_PAGE",
                                   nil];
    
    arrayList = [self SendRequest:mail_GetSearchMailList params:params];
    [params release];
    return arrayList;
}
//******************************************************
// Method:     getMailDetails
// Access:     public 
// Returns:    BOOL
// Parameter:  mailShareID
// Note:	   得到mail详细
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableDictionary *) getMailDetails:(NSString *)shareID mailId:(NSString*)mailId useID:(NSString*)useID employee_id:(NSString *)employee_id box:(NSString *)box startRows:(NSString *)startrows
{
    NSMutableArray* arrayList;
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                                   mailId,      @"mailId",
                                   shareID,     @"mailShareId", 
                                   useID,       @"userId",
                                   startrows,   START_ROW,
                                   employee_id, @"employee_id",
                                   box,         @"box_type",
                                   nil];
    
    arrayList = [self SendRequest:mail_GetMailDetails params:params];
    
    if ([arrayList count] < 1 ) 
    {
        [params release];
        return  nil;
    }
     NSMutableDictionary* dictionarys = [arrayList objectAtIndex:0]; 
    [params release];
    return dictionarys;
}   

-(NSMutableDictionary *) getMailDetailsShow:(NSString *)shareID {
    NSMutableArray* arrayList;
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                                   shareID,     @"mailShareId", 
                                   nil];
    
    arrayList = [self SendRequest:mail_GetMailDetailsShow params:params];
    
    if ([arrayList count] < 1 ) 
    {
        [params release];
        return  nil;
    }
    NSMutableDictionary* dictionarys = [arrayList objectAtIndex:0]; 
    [params release];
    return dictionarys;
}   


//******************************************************
// Method:     getMailDetails
// Access:     public 
// Returns:    BOOL
// Parameter:  mailShareID
// Note:	   得到mail详细
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableDictionary *)GetNextPriorDetailMail:(NSString *)employee_id box:(NSString *)box startRows:(NSString *)startrows
{
    NSMutableArray* arrayList;
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                                   startrows,START_ROW,
                                   employee_id,@"employee_id",
                                   box,@"box_type", 
                                   nil];
    arrayList = [self SendRequest:mail_GetNextPriorDetailMail params:params];
    
    if ([arrayList count] < 1 ) 
    {
        [params release];
        return  nil;
    }
    
    NSMutableDictionary* dictionarys = [arrayList objectAtIndex:0]; 
    [params release];
    return dictionarys; 
}
//******************************************************
// Method:     settingMailImportFlag
// Access:     public 
// Returns:    void
// Parameter:  mail_id          邮件id
// Parameter:  employee_id      员工id
// Parameter:  importantFlag    是否重要标志
// Note:	   设置邮件的重要标志
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(BOOL) settingMailImportantFlag:(NSString *)mail_id employId:(NSString *)employee_id importantFlag:(NSString *)importantFlag
{
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:mail_id,@"mail_share_id",employee_id,@"employee_id",importantFlag,@"importantflag", nil];
    NSMutableArray* arrayList = [self SendRequest:mail_SettingMailImportFlag params:params];
    [params release];
    if ([arrayList count] < 1) 
    {
        return  NO;
    }
    NSMutableDictionary* dictionarys = [arrayList objectAtIndex:0]; 
    NSString* strImportFlag = [dictionarys objectForKey:@"success_flag"];
    if ([strImportFlag compare:@"1"] == 0) 
    {
        return YES;
    }else
    {
        return NO;
    }
}

//******************************************************
// Method:     getEmployeeList
// Access:     public 
// Returns:    void
// Parameter:  startrows
// Parameter:  rowsperpage
// Note:	   取得业务员的列表
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableArray *) getEmployeeList:(NSString *)strPosID
{
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:strPosID, @"position_id", nil];
    NSMutableArray* dictionarys = [self SendRequest:mail_GetEmployeeList params:params];
    [params release];
    return dictionarys;
}
//******************************************************
// Method:     sendNewMail
// Access:     public 
// Returns:    void
// Parameter:  startrows
// Parameter:  rowsperpage
// Note:	   发送邮件
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(void) sendNewMail:(NSMutableDictionary *)newMailData
{
    [self SendRequest:mail_SendNewMail params:newMailData];
    //[newMailData release];
}

//******************************************************
// Method:     saveNewMail
// Access:     public 
// Returns:    void
// Parameter:  startrows
// Parameter:  rowsperpage
// Note:	   保存邮件
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(void) saveNewMail:(NSMutableDictionary *)newMailData
{
    [self SendRequest:mail_SaveNewMail params:newMailData];
    [newMailData release];
}
//******************************************************
// Method:     settingMultiMerger
// Access:     public 
// Returns:    void
// Parameter:  startrows
// Parameter:  rowsperpage
// Note:	   合并邮件
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableDictionary*) settingMultiMerger:(NSMutableDictionary *)mailMergeParam
{
    NSMutableArray* array = [self SendRequest:mail_SettingMultiMerger params:mailMergeParam];
    
    if ([array count] < 1) 
    {
        return  nil;
    }
    NSMutableDictionary* dicRet = [array objectAtIndex:0];
    return dicRet;
}


//******************************************************
// Method:     deleteMail
// Access:     public 
// Returns:    void
// Parameter:  startrows
// Parameter:  rowsperpage
// Note:	   发送邮件
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(BOOL) deleteMail:(NSString *)mailShareid
{
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:mailShareid,@"mail_share_ids", nil];
    
    NSMutableArray* arrayList = [self SendRequest:mail_DeleteMail params:params];
    [params release];
    
    if ([arrayList count] < 1)
    {
        return NO;
    }
    
    NSMutableDictionary* dictionarys = [arrayList objectAtIndex:0]; 
    
    NSString* strImportFlag = [dictionarys objectForKey:@"seccess_flag"];
    if ([strImportFlag compare:@"1"] == 0) 
    {
        return YES;
    }else
    {
        return NO;
    }
}
//******************************************************
// Method:     getCustomerList
// Access:     public 
// Returns:    void
// Parameter:  startrows
// Parameter:  rowsperpage
// Note:	   发送邮件
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableArray *) getMailCustomerList:(NSString *)employee_id positionID:(NSString *)positionid startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:employee_id, @"employeeId", positionid, @"positionId",startrows, START_ROW, rowsperpage, ROWS_PER_PAGE,nil];
    dictionarys = [self SendRequest:mail_GetCustomerList params:params];
    [params release];
    return dictionarys;
}

//******************************************************
// Method:     settingMailReadFlag
// Access:     public 
// Returns:    BOOL
// Parameter:  mailShareID
// Note:	   设置已经读标志
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(BOOL) settingMailReadFlag:(NSString *)mailShareID
{
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:mailShareID, @"mail_share_id", nil];
    
    NSMutableArray* arrayList = [self SendRequest:mail_SettingMailReadFlag params:params];
    [params release];
    
    if ([arrayList count] < 1)
    {
        return  NO;
    }
    
    NSMutableDictionary* dictionarys = [arrayList objectAtIndex:0]; 
    NSString* strReadFlag = [dictionarys objectForKey:@"success_flag"];
    if ([strReadFlag compare:@"1"] == 0) 
    {
        return YES;
    }else
    {
        return NO;
    }
}

//******************************************************
// Method:     getMailByBoxCountNoRead
// Access:     public 
// Returns:    BOOL
// Parameter:  mailShareID
// Note:	   设置已经读标志
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(int) getMailByBoxCountNoRead:(NSString*)employee_id boxType:(NSString*)boxType
{
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:employee_id,@"employee_id",boxType,@"box_type", nil];
    
    NSMutableArray* tmpArrayList = [self SendRequest:mail_GetMailByBoxCountNoRead params:params];
    
    NSMutableArray* arrayList = [[NSMutableArray alloc]initWithArray:tmpArrayList]; 
    [params release];
    if ([arrayList count] < 1) 
    {
        [arrayList release];
        return 0;
    }
    NSMutableDictionary* dic = [arrayList objectAtIndex:0];
    NSString* strCount = [dic objectForKey:@"MAIL_COUNT_NO_READ"];
    [arrayList release];
    return strCount.integerValue;
}

//******************************************************
// Method:     getCustomerMailList
// Access:     public 
// Returns:    BOOL
// Parameter:  mailShareID
// Note:	   得到客户的mial列表
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableArray *) getCustomerMailList:(NSString *)employee_id customer_id:(NSString *)customer_id box:(NSString *)box startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,employee_id,@"employee_id",customer_id,@"customer_id",box,@"box_type", nil];
    dictionarys = [self SendRequest:mail_GetCustomerMailList params:params];
    [params release];
    return dictionarys;
}
//******************************************************
// Method:     getSearchCustomerMailList
// Access:     public 
// Returns:    BOOL
// Parameter:  mailShareID
// Note:	   查找得到收件人，抄送人列表
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableArray *) getSearchCustomerMailList:(NSString*)employee_id customer_id:(NSString*)customer_id boxType:(NSString*)boxType  search_condition:(NSString*)search_condition search_type:(NSString*)search_type startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* arrayList;
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:                 
                                   employee_id, @"employee_id", 
                                   customer_id, @"customer_id",
                                   boxType, @"box_type",
                                   search_condition, @"search_condition",
                                   search_type, @"search_type",
                                   startrows, @"START_ROW",
                                   rowsperpage, @"ROWS_PER_PAGE",
                                   nil];
    
    arrayList = [self SendRequest:mail_GetSearchCustomerMailList params:params];
    [params release];
    return arrayList;
}

//******************************************************
// Method:     getContactorlist
// Access:     public 
// Returns:    BOOL
// Parameter:  mailShareID
// Note:	   得到收件人，抄送人列表
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableArray *) getContactorlist:(NSString *)employee_id startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage

{
    NSMutableArray* dictionarys;
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows,START_ROW,rowsperpage,ROWS_PER_PAGE, employee_id,@"employee_id", nil];
    
    dictionarys = [self SendRequest:mail_getContactorlist params:params];
    [params release];
    return dictionarys;
}

//******************************************************
// Method:     getSearchContactorList
// Access:     public 
// Returns:    BOOL
// Parameter:  mailShareID
// Note:	   得到收件人，抄送人列表
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableArray *) getSearchContactorList:(NSString *)employee_id search_condition:(NSString*)search_condition search_type:(NSString *)search_type startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* array;
    NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:                 
                                   employee_id, @"employee_id", 
                                   search_condition, @"search_condition",
                                   search_type, @"search_type",
                                   startrows, @"START_ROW",
                                   rowsperpage, @"ROWS_PER_PAGE",
                                   nil];
    
    array = [self SendRequest:mail_GetSearchContactorList params:params];
    [params release];
    return array;
}

//******************************************************
// Method:     getFirstCustomerMailList
// Access:     public 
// Returns:    BOOL
// Parameter:  employee_id
// Note:	   取得第一个客户邮件的列表
// Author      muzongcun  2012/03/12 create
//*******************************************************
-(NSMutableArray *)getFirstCustomerMailList:(NSString *)employee_id positionID:(NSString *)positionid boxType:(NSString*)boxType startRows:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* array;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
                                    employee_id, @"employeeId", 
                                    positionid, @"positionId",
                                    boxType, @"box_type",
                                    startrows, START_ROW, 
                                    rowsperpage, ROWS_PER_PAGE,nil];
    
    array = [self SendRequest:mail_GetFirstCustomerMailList params:params];
    [params release];
    return array;
    
}
//******************************************************
// Method:     updateCurrentPoint
// Access:     public 
// Returns:    BOOL
// Parameter:  latitude
// Parameter:  longitude
// Parameter:  currentTime
// Note:	   更新当前的经纬度到服务器
// Author      muzongcun  2012/05/10 create
//*******************************************************
-(NSMutableArray *) updateCurrentPoint:(NSString*)latitude longitude:(NSString*)longitude currentTime:(NSString*)currentTime
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:latitude,@"lat",longitude,@"lon",currentTime,@"time",nil];
    
    dictionarys = [self SendRequest:common_UpdateCurrentPoint params:params];
    
    [params release];
    return dictionarys;  
}
//Employe
-(NSMutableArray *) GetEmployeList:(NSString *)startrows rowsPerPage:(NSString *)rowsperpage
{
    NSMutableArray* dictionarys;
    NSMutableDictionary * params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:startrows,START_ROW,rowsperpage,ROWS_PER_PAGE,nil];
    
    dictionarys = [self SendRequest:member_GetEmployeList params:params];
    
    [params release];
    return dictionarys;   
}


@end
